import request from '@/utils/request'


/**
 * 根据身份证号查询患者信息
 * @param idCard 身份证信息
 * @returns {*}
 */
export function getPatientByIdCard(idCard) {
	return request({
		url: `/seeADoctor/PatientLibrary/getPatientInfoByIdCar/${idCard}`,
		method: 'get'
	})
}

/**
 * 保存挂号信息
 * @param data
 * @returns {*}
 */
export function addRegistration(data) {
	return request({
		url: '/seeADoctor/Registered/addRegistration',
		method: 'post',
		data
	})
}

/**
 * 进行挂号收费
 * @param registrationId  挂号id
 * @returns {*}
 */
export function collectFee(registrationId) {
	return request({
		url: `/seeADoctor/Registered/collectFee/${registrationId}`,
		method: 'get'
	})
}

/**
 * 分页查询挂号信息
 * @returns {*}
 * @param data
 */
export function queryRegistrationForPage(data) {
	return request({
		url: '/seeADoctor/RegisteredList/queryRegistrationForPage',
		method: 'post',
		data
	})
}

/**
 * 作废
 * @param registrationId
 * @returns {*}
 */
export function doInvalid(registrationId) {
	return request({
		url: `/seeADoctor/RegisteredList/doInvalid/${registrationId}`,
		method: 'get'
	})
}

/**
 * 退号
 * @param registrationId
 * @returns {*}
 */
export function doReturn(registrationId) {
	return request({
		url: `/seeADoctor/RegisteredList/doReturn/${registrationId}`,
		method: 'GET'
	})
}
